import { getAction, deleteAction, putAction, postAction, httpAction, downFile } from '@/api/manage'

const serviceName = '/sjsk-detection-service'
/*-----------社戒社康人员管理-----------*/

// 咨询列表
const legalAidConsultList = (params) => getAction(`${serviceName}/legalAidConsult/list`, params)
const cancelConsult = (params) => postAction(`${serviceName}/legalAidConsult/cancelConsult`, params)
const applyConsult = (params) => postAction(`${serviceName}/legalAidConsult/applyConsult`, params)
const consultDetail = (params) => getAction(`${serviceName}/legalAidConsult/consultDetail`,params)
const appointmentConsult = (params) => postAction(`${serviceName}/legalAidConsult/appointmentConsult`, params)
const sjskPersonList = (params) => getAction(`${serviceName}/legalAidConsult/sjskPersonList`, params)
const consultHistory = (params) => getAction(`${serviceName}/legalAidConsult/historyRecord`, params)

const consultListExportXls = (params) =>
  downFile(`${serviceName}/legalAidConsult/consultListExportXls`, params, 'post')




const consultApplication = (params) => postAction(`${serviceName}/sjskConAppoint/consultApplication`, params)

const planList = (userId) => getAction(`/sjsk-detection-service/plan/planList/${userId}`, null)
const checkPlan = (params) => getAction(`/sjsk-detection-service/plan/checkPlan`, params)

export {
  legalAidConsultList,
  consultListExportXls,
  cancelConsult,
  applyConsult,
  consultDetail,
  appointmentConsult,
  sjskPersonList,
  consultHistory,
  consultApplication,
  planList,
  checkPlan
}
